<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
</head>
<body>
<h2>登录</h2>
<form method="POST" action="/login">
    {{ form.hidden_tag() }}
    <p>
        {{ form.username.label }}<br>
        {{ form.username(size=32) }}<br>
        {% for error in form.username.errors %}
            <span style="color: red;">{{ error }}</span>
        {% endfor %}
    </p>
    <p>
        {{ form.password.label }}<br>
        {{ form.password(size=32) }}<br>
        {% for error in form.password.errors %}
            <span style="color: red;">{{ error }}</span>
        {% endfor %}
    </p>
    <p>
        {{ form.submit() }}
    </p>
    <p>
        {% for message in get_flashed_messages(category_filter='success') %}
            <span style="color: blue;">{{ message }}</span>
        {% endfor %}
    </p>
</form>
</body>
</html>
